package com.lyc.yuki.common.exception.custom;

import com.lyc.yuki.common.result.HttpStatusEnum;
import lombok.Getter;

/**
 * 业务异常
 *
 * @Author: lyc
 * @Date: 2025/7/7 15:40
 */
@Getter
public class ServiceException extends RuntimeException {

    private Integer code;

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(HttpStatusEnum httpStatusEnum) {
        super(httpStatusEnum.getMessage());
        this.code = httpStatusEnum.getCode();
    }
}
